<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <base href="../static"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link type="text/css" rel="stylesheet" href="css/style.css"/>
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
    <script type="text/javascript">
        EvPNG.fix('div, ul, img, li, input, a');
    </script>
    <![endif]-->
    <script type="text/javascript" src="js/jquery-1.11.1.min_044d0927.js"></script>
    <script type="text/javascript" src="js/jquery.bxslider_e88acd1b.js"></script>

    <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="js/menu.js"></script>

    <script type="text/javascript" src="js/select.js"></script>

    <script type="text/javascript" src="js/lrscroll.js"></script>

    <!--  注册验证和提示框引入  -->
    <script type="text/javascript" src="js/register.js"></script>
    <script type="text/javascript" src="js/leading.js"></script>
    <script type="text/javascript" src="js/coco-message.js"></script>


    <script type="text/javascript" src="js/iban.js"></script>
    <script type="text/javascript" src="js/fban.js"></script>
    <script type="text/javascript" src="js/f_ban.js"></script>
    <script type="text/javascript" src="js/mban.js"></script>
    <script type="text/javascript" src="js/bban.js"></script>
    <script type="text/javascript" src="js/hban.js"></script>
    <script type="text/javascript" src="js/tban.js"></script>

    <script type="text/javascript" src="js/lrscroll_1.js"></script>


    <title>尤洪</title>
</head>
<body>
<!--Begin Header Begin-->
<div class="soubg">
    <div class="sou">
        <!--Begin 所在收货地区 Begin-->
        <span class="s_city_b">
        	<span class="fl">送货至：</span>
            <span class="s_city">
            	<span>四川</span>
                <div class="s_city_bg">
                	<div class="s_city_t"></div>
                    <div class="s_city_c">
                    	<h2>请选择所在的收货地区</h2>
                        <table border="0" class="c_tab" style="width:235px; margin-top:10px;" cellspacing="0"
                               cellpadding="0">
                          <tr>
                            <th>A</th>
                            <td class="c_h"><span>安徽</span><span>澳门</span></td>
                          </tr>
                          <tr>
                            <th>B</th>
                            <td class="c_h"><span>北京</span></td>
                          </tr>
                          <tr>
                            <th>C</th>
                            <td class="c_h"><span>重庆</span></td>
                          </tr>
                          <tr>
                            <th>F</th>
                            <td class="c_h"><span>福建</span></td>
                          </tr>
                          <tr>
                            <th>G</th>
                            <td class="c_h"><span>广东</span><span>广西</span><span>贵州</span><span>甘肃</span></td>
                          </tr>
                          <tr>
                            <th>H</th>
                            <td class="c_h"><span>河北</span><span>河南</span><span>黑龙江</span><span>海南</span><span>湖北</span><span>湖南</span></td>
                          </tr>
                          <tr>
                            <th>J</th>
                            <td class="c_h"><span>江苏</span><span>吉林</span><span>江西</span></td>
                          </tr>
                          <tr>
                            <th>L</th>
                            <td class="c_h"><span>辽宁</span></td>
                          </tr>
                          <tr>
                            <th>N</th>
                            <td class="c_h"><span>内蒙古</span><span>宁夏</span></td>
                          </tr>
                          <tr>
                            <th>Q</th>
                            <td class="c_h"><span>青海</span></td>
                          </tr>
                          <tr>
                            <th>S</th>
                            <td class="c_h"><span>上海</span><span>山东</span><span>山西</span><span class="c_check">四川</span><span>陕西</span></td>
                          </tr>
                          <tr>
                            <th>T</th>
                            <td class="c_h"><span>台湾</span><span>天津</span></td>
                          </tr>
                          <tr>
                            <th>X</th>
                            <td class="c_h"><span>西藏</span><span>香港</span><span>新疆</span></td>
                          </tr>
                          <tr>
                            <th>Y</th>
                            <td class="c_h"><span>云南</span></td>
                          </tr>
                          <tr>
                            <th>Z</th>
                            <td class="c_h"><span>浙江</span></td>
                          </tr>
                        </table>
                    </div>
                </div>
            </span>
        </span>
        <!--End 所在收货地区 End-->
        <!--     session为空时   -->
        <span class="fr" th:if="${#strings.isEmpty(session.userSession)}">
        	<span class="fl">你好，请<a th:href="@{user/login}">登录</a>&nbsp; <a th:href="@{user/regist}"
                                                                            style="color:#ff4e00;">免费注册</a>&nbsp;</span>
        </span>

        <!--      session 不为空时  -->
        <span class="fr" th:if="${not #strings.isEmpty(session.userSession)}">
                    <span class="fl"><a
                            th:href="@{user/admin(id=${session.userSession.id},action=${session.userSession.userName})}"
                            th:text="${session.userSession.userName}"></a>&nbsp;|&nbsp;
                        <a th:href="@{order/queryAllOrderOrByUserId(current=1,userId=${session.userSession.id})}"
                           style="color:#ff4e00;">我的订单</a>&nbsp;|&nbsp;
                        <a th:href="@{easybuy/products(current=1)}"
                           th:if="${session.userSession.type==1}">后台管理 &nbsp;| </a><a
                                th:href="@{user/loginOut}">注销</a>&nbsp;</span>
        </span>
    </div>
</div>
<div class="m_top_bg">
    <div class="top">
        <div class="m_logo"><a href="user/initIndex"><img src="images/logo1.png"/></a></div>
        <div class="m_search">
            <form action="user/search" method="post">
                <input type="text" name="name"th:value="${name}" class="m_ipt"/>
                <input type="submit" value="搜索" class="m_btn"/>
            </form>
            <span class="fl"><a href="#">咖啡</a><a href="#">iphone 6S</a><a href="#">新鲜美食</a><a href="#">蛋糕</a><a
                    href="#">日用品</a><a href="#">连衣裙</a></span>
        </div>
        <div class="i_car">
            <div class="car_t">购物车 [ <span th:text="${session.userSession!=null?session.order.size:'空'}"
                                           id="number"></span>
                ]
            </div>
            <div class="car_bg">
                <!--Begin 购物车未登录 Begin-->
                <div class="un_login" th:if="${#strings.isEmpty(session.userSession)}">还未登录！<a href="user/login"
                                                                                               style="color:#ff4e00;">马上登录</a>
                    查看购物车！
                </div>

                <div class="un_login" th:if="${not #strings.isEmpty(session.userSession)}">我的购物车</div>

                <!--End 购物车未登录 End-->
                <!--Begin 购物车已登录 Begin-->
                <ul class="cars" id="ul" th:if="${not #strings.isEmpty(session.userSession)}">
                    <li th:each="orders:${session.order}">
                        <div class="img"><a  th:href="@{car/product(id=${orders.productId})}">
                            <img th:src="'upload/'+${orders.images}" width="58" height="58"/>
                            <!--                        <img src="images/car2.jpg" width="58" height="58"/>-->
                        </a></div>
                        <div class="name"><a th:href="@{car/product(id=${orders.productId})}" th:text="${orders.name}"></a></div>
                        <div class="price"><font color="#ff4e00" th:text="'￥'+${orders.price}"></font> <span
                                th:text="'X'+${orders.number}"></span></div>
                    </li>

                </ul>
                <div class="price_sum">共计&nbsp; <font color="#ff4e00">￥</font><span id="sumPrice"
                                                                                    th:text="${session.sumPrice==null?0:session.sumPrice}"></span>
                </div>
                <div class="price_a" th:if="${session.userSession!=null}"><a th:href="@{car/settlement}">去购物车结算</a>
                </div>
                <div class="price_a" th:if="${session.userSession==null}"><a href="user/login">去登陆</a></div>
                <!--            End 购物车已登录 End-->
            </div>
        </div>
    </div>
    <!--End Header End-->
    <div class="i_bg bg_color">
        <!--Begin 用户中心 Begin -->
        <div class="m_content">
            <div class="m_left">
                <div class="left_n">管理中心</div>
                <div class="left_m">
                    <div class="left_m_t t_bg1">订单中心</div>
                    <ul>
                        <li>
                            <a th:class="${session.show=='queryById'  and session.action=='queryAllOrder' or session.action=='queryOrderDeatil' and session.show=='queryById'?'now':''}"
                               th:href="@{order/queryAllOrderOrByUserId(current=1,userId=${session.userSession.id})}">我的订单</a>
                        </li>
                        <li th:if="${session.userSession.type==1}"><a
                                th:href="@{order/queryAllOrderOrByUserId(current=1,userId=null)}"
                                th:class="${session.show=='queryAllOrder' and session.action=='queryAllOrder' or session.action=='queryOrderDeatil' and session.show=='queryAllOrder'?'now':''}">全部订单</a>
                        </li>
                        <!--                    <li><a href="#">缺货登记</a></li>-->
                        <!--                    <li><a href="#">跟踪订单</a></li>-->
                    </ul>
                </div>
                <div class="left_m">
                    <div class="left_m_t t_bg2">会员中心</div>
                    <ul>
                        <li><a th:href="@{user/admin(id=${session.userSession.id})}"
                               th:class="${session.action==null or session.action==''?'now':''}">用户信息</a></li>
                        <li th:if="${session.userSession.type==1}"><a
                                th:href="@{user/memberCollect(action='memberCollect')}"
                                th:class="${session.action=='memberCollect'||session.action=='toAddUser'?'now':''}">用户列表</a>
                        </li>
                        <!--                    <li><a href="Member_Msg.html">我的留言</a></li>-->
                        <!--                    <li><a href="Member_Links.html">推广链接</a></li>-->
                        <!--                    <li><a href="#">我的评论</a></li>-->
                    </ul>
                </div>
                <div class="left_m" th:if="${session.userSession.type==1}">
                    <div class="left_m_t t_bg3">商品管理</div>
                    <ul>
                        <li><a th:href="@{category/classifyManage(current=1)}"
                               th:class="${session.action=='classifyManage'?'now':''}">分类管理</a></li>
                        <li><a th:href="@{easybuy/products(current=1)}"
                               th:class="${session.action=='product'?'now':''}">商品管理</a>
                        </li>
                        <li><a th:href="@{easybuy/putaway(id=null)}"
                               th:class="${session.action=='putaway'?'now':''}">商品上架</a></li>
                    </ul>
                </div>
                <div class="left_m">
                    <div class="left_m_t t_bg4">咨询中心</div>
                    <ul>
                        <li><a th:href="@{news/consult(current=1,action='consult')}"
                               th:class="${session.action=='consult'||session.action=='newsDeatil'?'now':''}">咨询列表</a>
                        </li>
                        <!--                    <li><a href="Member_Results.html">我的业绩</a></li>-->
                        <!--                    <li><a href="Member_Commission.html">我的佣金</a></li>-->
                        <!--                    <li><a href="Member_Cash.html">申请提现</a></li>-->
                    </ul>
                </div>
            </div>
            <div th:switch="${session.action}">

                <!--        新闻列表    -->
                <div class="m_right" th:case="consult">
                    <p></p>
                    <div class="mem_t">咨询列表</div>
                    <table border="0" class="order_tab" style="width:930px; text-align:center; margin-bottom:30px;">

                        <tbody>
                        <tr>
                            <td width="20%">文章标题</td>
                            <td width="25%">创建时间</td>
                        </tr>
                        <tr th:each="list:${lists}">
                            <td>
                                <a th:href="@{news/newsDeatil(id=${list.id})}" th:text="${list.title}"></a>

                            </td>
                            <td th:text="${list.createTime}"></td>
                        </tr>

                        </tbody>
                    </table>

                    <div class="pages">

                        <a th:href="@{news/consult(current=1,action='consult')}" class="p_pre">首页</a>

                        <a th:href="@{news/consult(current=${current}-1,action='consult')}" th:if="${current}-1>=1"
                           class="p_pre">上一页</a>

                        <a th:href="@{news/consult(current=${status.count},action='consult')}"
                           th:class="${current==status.count?'cur':''}" th:if="${status.count<=sumPage}"
                           th:each="list,status : ${#numbers.sequence(1,sumPage)}" th:text="${status.count}"></a>

                        <a th:href="@{news/consult(current=${current}+1,action='consult')}"
                           th:if="${current}+1<=${sumPage}"
                           class="p_pre">下一页</a>

                        <a th:href="@{news/consult(current=${sumPage},action='consult')}">尾页</a>
                    </div>

                </div>

                <!--        单条新闻    -->
                <div class="m_right" th:case="newsDeatil">
                    <p></p>
                    <div class="mem_tit" th:text="${Einzelband.title}"></div>
                    <p style="padding:0 40px; margin:0 auto 20px auto;" th:text="${Einzelband.content}">
                    </p>
                </div>

                <!--       用户列表     -->
                <div class="m_right" id="content" th:case="memberCollect">
                    <div class="mem_tit">用户列表</div>
                    <p align="right">
                        <a th:href="@{user/toAddUser(id=null)}" class="add_b">添加用户</a>
                        <br>
                    </p>
                    <br>
                    <table border="0" class="order_tab" style="width:930px; text-align:center; margin-bottom:30px;"
                           cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td width="10%">用户名称</td>
                            <td width="10%">真实姓名</td>
                            <td width="5%">性别</td>
                            <td width="5%">类型</td>
                            <td width="5%" colspan="2">操作</td>
                        </tr>
                        <tr th:each="list:${lists}">
                            <td th:text="${list.loginName}"></td>
                            <td th:text="${list.userName}"></td>
                            <td th:text="${list.sex==1?'男':'女'}"></td>
                            <td th:text="${list.type==1?'管理员':'用户'}"></td>
                            <td>
                                <a th:href="@{user/toAddUser(id=${list.id})}">修改</a>
                            </td>
                            <td>
                                <a th:if="${list.type==0}" href="javascript:void(0);"
                                   th:onclick="'javascript:deleteUserId('+${list.id}+')'">删除</a>
                            </td>
                        </tr>
                        </tbody>

                    </table>
                    <div class="pages">

                        <a th:href="@{user/memberCollect(current=1,action='memberCollect')}" class="p_pre">首页</a>

                        <a th:href="@{user/memberCollect(current=${current}-1,action='memberCollect')}"
                           th:if="${current}-1>=1"
                           class="p_pre">上一页</a>

                        <a th:href="@{user/memberCollect(current=${status.count},action='memberCollect')}"
                           th:class="${current==status.count?'cur':''}" th:if="${status.count<=sumPage}"
                           th:each="list,status : ${#numbers.sequence(1,sumPage)}" th:text="${status.count}"></a>

                        <a th:href="@{user/memberCollect(current=${current}+1,action='memberCollect')}"
                           th:if="${current}+1<=${sumPage}"
                           class="p_pre">下一页</a>

                        <a th:href="@{user/memberCollect(current=${sumPage},action='memberCollect')}">尾页</a>
                    </div>
                </div>

                <div class="m_right" th:case="toAddUser">
                    <div class="mem_tit" th:text="${user==null?'添加用户':'修改用户'}"></div>
                    <br>
                    <form id="userAdd">
                        <table border="0" class="add_tab" style="width:930px;" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="135" align="right">用户姓名</td>
                                <td colspan="3" style="font-family:'宋体';">
                                    <input type="text" th:value="${user!=null?user.loginName:''}" class="add_ipt"
                                           name="loginName"/>
                                    <input type="hidden" th:value="${user!=null?user.id:''}" name="id">
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">真实姓名</td>
                                <td>
                                    <input type="text" th:value="${user!=null?user.userName:''}" class="add_ipt"
                                           name="userName"/>
                                </td>
                            </tr>

                            <tr th:if="${user==null}">
                                <td width="135" align="right">密码</td>
                                <td>
                                    <input type="password" value="" class="add_ipt" name="password"/>
                                </td>
                            </tr>
                            <tr th:if="${user==null}">
                                <td width="135" align="right">确认密码</td>
                                <td>
                                    <input type="password" value="" class="add_ipt" name="pwd"/>
                                </td>
                            </tr>

                            <tr>
                                <td width="135" align="right">身份证号</td>
                                <td>
                                    <input type="text" th:value="${user!=null?user.identityCode:''}" class="add_ipt"
                                           name="identityCode"
                                           id="identityCode"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">电子邮箱</td>
                                <td>
                                    <input type="text" th:value="${user!=null?user.email:''}" class="add_ipt"
                                           name="email"
                                           id="email"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">手机</td>
                                <td>
                                    <input type="text" th:value="${user!=null?user.mobile:''}" class="add_ipt"
                                           name="mobile"
                                           id="mobile"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">用户类型</td>
                                <td>
                                    <select name="type" th:disabled="${user!=null and user.id==session.userSession.id}">
                                        <option value="1" th:selected="${user!=null and user.type==0}">管理员</option>
                                        <option value="0" th:selected="${user!=null and user.type==0}">普通用户</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td></td>
                                <td>
                                    <input type="button" th:value="${user==null?'添加用户':'修改信息'}" class="s_btn"
                                           onclick="addUser()">
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>

                <!--         查询所有订单或者我的订单   -->
                <div class="m_right" th:case="queryAllOrder">
                    <p></p>
                    <p></p>
                    <div class="mem_tit">订单列表</div>

                    <table border="0" class="order_tab" style="width:930px; text-align:center; margin-bottom:30px;"
                           cellspacing="0" cellpadding="0" th:if="${orderState.size()>0}">
                        <tbody th:each="list:${orderState}">
                        <tr class="td_bg">
                            <td>用户名:
                                <sapn th:text="${list.loginName}"></sapn>
                            </td>
                            <td><a th:href="@{order/queryOrderDeatil(id=${list.id})}">订单号:<span
                                    th:text="${list.serialNumber}"></span></a>
                            </td>
                            <td>地址:<span th:text="${list.userAddress}"></span></td>
                            <td>￥<span th:text="${list.cost}"></span></td>
                        </tr>
                        <tr>
                            <td colspan="4">

                                <table border="0" class="order_tab"
                                       style="width:930px; text-align:center; margin-bottom:30px;" cellspacing="0"
                                       cellpadding="0">
                                    <thead>
                                    <tr>
                                        <td width="20%">商品名称</td>
                                        <td width="20%">商品图片</td>
                                        <td width="25%">数量</td>
                                        <td width="25%">价格</td>
                                    </tr>

                                    </thead>
                                    <tbody>

                                    <tr th:each="lists:${orderState2}" th:if="${list.serialNumber==lists.serialNumber}">
                                        <td th:text="${lists.name}"></td>
                                        <td>
                                            <a th:href="@{car/product(id=${lists.pid})}" target="_blank">
                                                <img th:src="'upload/'+${lists.fileName}"
                                                     width="50" height="50">
                                            </a>
                                        </td>
                                        <td th:text="${lists.quantity}"></td>
                                        <td th:text="${lists.price}"></td>
                                    </tr>
                                    </tbody>
                                </table>

                            </td>
                        </tr>
                        </tbody>
                    </table>

                    <div class="pages" th:if="${orderState.size()<=0}">
                        暂无记录
                    </div>

                    <div class="pages">

                        <a th:href="@{order/queryAllOrderOrByUserId(current=1,userId=${userId})}" class="p_pre">首页</a>

                        <a th:href="@{order/queryAllOrderOrByUserId(current=${current}-1,userId=${userId})}"
                           th:if="${current}-1>=1"
                           class="p_pre">上一页</a>

                        <a th:href="@{order/queryAllOrderOrByUserId(current=${status.count},userId=${userId})}"
                           th:class="${current==status.count?'cur':''}"
                           th:each="list,status: ${#numbers.sequence(1,sumPage)}" th:text="${status.count}"></a>


                        <a th:href="@{order/queryAllOrderOrByUserId(current=${current}+1,userId=${userId})}"
                           th:if="${current}+1<=${sumPage}"
                           class="p_pre">下一页</a>

                        <a th:href="@{order/queryAllOrderOrByUserId(current=${sumPage},userId=${userId})}">尾页</a>
                    </div>

                </div>

                <!--              查询单条订单  -->
                <div class="m_right" th:case="queryOrderDeatil">

                    <p></p>
                    <div class="mem_tit">订单明细列表</div>
                    <table border="0" class="order_tab" style="width:930px; text-align:center; margin-bottom:30px;"
                           cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td width="20%">商品名称</td>
                            <td width="20%">商品图片</td>
                            <td width="25%">数量</td>
                            <td width="25%">价格</td>
                        </tr>
                        <tr th:each="lists:${list}">
                            <td>
                                <a th:href="@{car/product(id=${lists.productId})}" target="_blank"
                                   th:text="${lists.name}">

                                </a>
                            </td>
                            <td>
                                <img th:src="'upload/'+${lists.fileName}" width="50" height="50">
                            </td>
                            <td th:text="${lists.quantity}"></td>
                            <td th:text="${lists.cost}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <!-- 分类管理 -->
                <div class="m_right" th:case="classifyManage">
                    <div class="mem_tit">分类列表</div>
                    <p align="right">
                        <a href="javascript:void(0);" onclick="toAddProductCategory();" class="add_b">添加分类</a>
                        <br>
                    </p>
                    <br>
                    <table border="0" class="order_tab" style="width:930px; text-align:center; margin-bottom:30px;"
                           cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td width="5%">选择</td>
                            <td width="20%">分类名称</td>
                            <td width="25%">分类级别</td>
                            <td width="25%">父级分类</td>
                            <td width="25%">操作</td>
                        </tr>
                        <tr th:each="list:${lists}">
                            <td width="5%"><input type="radio" th:value="${list.id}" name="select"
                                                  th:onclick="'javascript:toUpdateProductCategoryList(this,'+${list.type}+')'">
                            </td>
                            <td th:text="${list.name}">化妆品</td>
                            <td th:text="${list.type==1?'一级分类':list.type==2?'二级分类':list.type==3?'三级分类':'错误代码！'}"></td>
                            <td th:text="${list.names=='AA'?'无':list.names}"></td>
                            <td><a href="javascript:void(0);"
                                   th:onclick="'javascript:deleteProductCategory('+${list.id}+')'">删除</a></td>
                        </tr>
                        </tbody>
                    </table>

                    <div class="pages">

                        <a th:href="@{category/classifyManage(current=1,action='classifyManage')}" class="p_pre">首页</a>

                        <a th:href="@{category/classifyManage(current=${current}-1,action='classifyManage')}"
                           th:if="${current}-1>=1"
                           class="p_pre">上一页</a>

                        <a th:href="@{category/classifyManage(current=${status.count},action='classifyManage')}"
                           th:class="${current==status.count?'cur':''}" th:if="${status.count<=sumPage}"
                           th:each="list,status : ${#numbers.sequence(1,sumPage)}" th:text="${status.count}"></a>

                        <a th:href="@{category/classifyManage(current=${current}+1,action='classifyManage')}"
                           th:if="${current}+1<=${sumPage}"
                           class="p_pre">下一页</a>

                        <a th:href="@{category/classifyManage(current=${sumPage},action='classifyManage')}">尾页</a>
                    </div>

                    <div id="addProductCategory">

                        <table border="0" class="add_tab" style="width:930px;" cellspacing="0" cellpadding="0">

                            <tbody>
                            <tr>
                                <td width="135" align="right">分类级别</td>
                                <td colspan="3" style="font-family:'宋体';">
                                    <select name="type" id="type"
                                            onchange="selectProductCategoryLevel(this,'productCategoryLevel1');">
                                        <option value="0" selected="selected">请选择...</option>
                                        <option value="1">一级分类
                                        </option>
                                        <option value="2">二级分类
                                        </option>
                                        <option value="3">三级分类
                                        </option>
                                    </select>
                                </td>
                            </tr>

                            <tr style="display: table-row;" id="leve1">
                                <td width="135" align="right">一级分类</td>
                                <td colspan="3" style="font-family:'宋体';">
                                    <select name="productCategoryLevel1" style="background-color:#f6f6f6;"
                                            id="productCategoryLevel1"
                                            onchange="queryProductCategoryList(this,'productCategoryLevel2');">
                                        <option value="0" selected="selected">请选择...</option>

                                    </select>
                                </td>
                            </tr>
                            <tr style="" id="leve2">
                                <td width="135" align="right">二级分类</td>
                                <td>
                                    <select name="productCategoryLevel2" style="background-color:#f6f6f6;"
                                            id="productCategoryLevel2">
                                        <option value="0" selected="selected">请选择...</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">分类名称</td>
                                <td style="font-family:'宋体';">
                                    <input type="text" value="" class="add_ipt" id="name">（必填）
                                    <input type="hidden" name="id" value="" id="ids">
                                </td>
                            </tr>
                            </tbody>
                        </table>

                        <p align="right">
                            <br>
                            <a href="javascript:void(0)" onclick="addOrUpdate()" class="add_b">确认修改</a>
                        </p>

                    </div>


                </div>

                <!-- 商品列表 -->
                <div class="m_right" th:case="product">
                    <div class="mem_tit">商品列表</div>
                    <br>
                    <table border="0" class="order_tab" style="width:930px; text-align:center; margin-bottom:30px;"
                           cellspacing="0" cellpadding="0">
                        <tbody>
                        <tr>
                            <td width="10%">商品名称</td>
                            <td width="10%">商品图片</td>
                            <td width="5%">库存</td>
                            <td width="10%">价格</td>
                            <td width="10%" colspan="2">操作</td>
                        </tr>
                        <tr th:each="list:${lists}">
                            <td th:text="${list.name}"></td>
                            <td>
                                <!--                            target="_blank"-->
                                <a th:href="@{car/product(id=${list.id})}">
                                    <img th:src="'upload/'+${list.fileName}" width="50" height="50"/>
                                </a>
                            </td>
                            <td th:text="${list.stock}"></td>
                            <td th:text="${list.price}"></td>
                            <td><a th:href="@{easybuy/putaway(id=${list.id})}">修改</a></td>
                            <td><a href="javascript:void(0);"
                                   th:onclick="'javascript:deleteById('+${list.id}+')'">删除</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>

                    <div class="pages">

                        <a th:href="@{easybuy/products(current=1)}" class="p_pre">首页</a>

                        <a th:href="@{easybuy/products(current=${current}-1)}"
                           th:if="${current}-1>=1"
                           class="p_pre">上一页</a>

                        <a th:href="@{easybuy/products(current=${status.count})}"
                           th:class="${current==status.count?'cur':''}" th:if="${status.count<=sumPage}"
                           th:each="list,status : ${#numbers.sequence(1,sumPage)}" th:text="${status.count}"></a>

                        <a th:href="@{easybuy/products(current=${current}+1)}"
                           th:if="${current}+1<=${sumPage}"
                           class="p_pre">下一页</a>

                        <a th:href="@{easybuy/products(current=${sumPage})}">尾页</a>
                    </div>

                </div>

                <!--        上架商品    -->
                <div class="m_right" th:case="putaway">

                    <div class="mem_tit" th:text="${session.sold=='add'?'添加商品':'修改商品'}"></div>

                    <br>
                    <form action="easybuy/productPutaway" method="post" enctype="multipart/form-data"
                          id="productAdd" onsubmit="return newStock()">
                        <table border="0" class="add_tab" style="width:930px;" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="135" align="right">一级分类</td>
                                <td colspan="3" style="font-family:'宋体';">
                                    <select name="categoryLevel1Id" style="background-color:#f6f6f6;" id="product1"
                                            onchange="queryProductCategoryList(this,'product2')">
                                        <option value="0">请选择...</option>
                                        <option th:each="list:${lists}" th:value="${list.id}"
                                                th:text="${list.name}"
                                                th:selected="${product!=null and product.categoryLevel1Id eq list.id}"></option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">二级分类</td>
                                <td>
                                    <select name="categoryLevel2Id" style="background-color:#f6f6f6;" id="product2"
                                            onchange="queryProductCategoryList(this,'product3');">
                                        <option value="0">请选择...</option>
                                        <option th:if="${session.sold=='update'}" th:each="list:${list2}"
                                                th:value="${list.id}"
                                                th:text="${list.name}"
                                                th:selected="${product!=null and product.categoryLevel2Id eq list.id}"></option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">三级分类</td>
                                <td>
                                    <select name="categoryLevel3Id" style="background-color:#f6f6f6;" id="product3">
                                        <option value="0" selected="selected">请选择...</option>
                                        <option th:if="${session.sold=='update'}" th:each="list:${list3}"
                                                th:value="${list.id}"
                                                th:text="${list.name}"
                                                th:selected="${product!=null and product.categoryLevel3Id eq list.id}"></option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">商品名称</td>
                                <td>
                                    <input type="text" th:value="${product!=null?product.name:''}" class="add_ipt"
                                           name="name" id="name"/>（必填）
                                    <input type="hidden" name="id" th:value="${product!=null?product.id:0}" id="id">
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">商品图片</td>
                                <td>
                                    <img th:if="${product!=null}" th:src="'upload/'+${product.fileName}" width="50"
                                         height="50"/>

                                    <input type="file" class="text" name="photo"/><span></span>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">单价</td>
                                <td>
                                    <input type="text" th:value="${product!=null?product.price:''}" class="add_ipt"
                                           name="price" id="price"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">库存</td>
                                <td>
                                    <input type="text" th:value="${product!=null?product.stock:''}" class="add_ipt"
                                           name="stock" id="stock"/>
                                </td>
                            </tr>
                            <tr>
                                <td width="135" align="right">描述</td>
                                <td>
                                <textarea name="description"
                                          th:text="${product!=null?product.description:''}"></textarea>
                                </td>
                            </tr>
                            <tr>
                                <td></td>
                                <td>
                                    <input type="submit" th:value="${session.sold=='add'?'上架商品':'确认修改'}" class="s_btn">
                                </td>
                            </tr>
                        </table>
                    </form>

                </div>
                <!--         默认   -->
                <div class="m_right" th:case="*">
                    <div class="m_des">
                        <table border="0" style="width:870px; line-height:22px;" cellspacing="0" cellpadding="0">
                            <tr valign="top">
                                <td width="115"><img src="images/user.jpg" width="90" height="90"/></td>
                                <td>
                                    <div class="m_user" th:text="${session.userSession.userName}"></div>
                                    <p th:text="'性别：'+${session.userSession.sex==1?'男':'女'}">
                                    <p th:text="'邮箱：'+${session.userSession.email}">
                                    <p th:text="'电话：'+${session.userSession.mobile}">
                                    </p>
                                </td>
                            </tr>
                        </table>
                    </div>

                </div>

            </div>
            <!--End 用户中心 End-->
            <!--Begin Footer Begin -->
            <div class="b_btm_bg b_btm_c">
                <div class="b_btm">
                    <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                           cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="72"><img src="images/b1.png" width="62" height="62"/></td>
                            <td><h2>正品保障</h2>正品行货 放心购买</td>
                        </tr>
                    </table>
                    <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                           cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="72"><img src="images/b2.png" width="62" height="62"/></td>
                            <td><h2>满38包邮</h2>满38包邮 免运费</td>
                        </tr>
                    </table>
                    <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                           cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="72"><img src="images/b3.png" width="62" height="62"/></td>
                            <td><h2>天天低价</h2>天天低价 畅选无忧</td>
                        </tr>
                    </table>
                    <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;"
                           cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="72"><img src="images/b4.png" width="62" height="62"/></td>
                            <td><h2>准时送达</h2>收货时间由你做主</td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="b_nav">
                <dl>
                    <dt><a href="#">新手上路</a></dt>
                    <dd><a href="#">售后流程</a></dd>
                    <dd><a href="#">购物流程</a></dd>
                    <dd><a href="#">订购方式</a></dd>
                    <dd><a href="#">隐私声明</a></dd>
                    <dd><a href="#">推荐分享说明</a></dd>
                </dl>
                <dl>
                    <dt><a href="#">配送与支付</a></dt>
                    <dd><a href="#">货到付款区域</a></dd>
                    <dd><a href="#">配送支付查询</a></dd>
                    <dd><a href="#">支付方式说明</a></dd>
                </dl>
                <dl>
                    <dt><a href="#">会员中心</a></dt>
                    <dd><a href="#">资金管理</a></dd>
                    <dd><a href="#">我的收藏</a></dd>
                    <dd><a href="#">我的订单</a></dd>
                </dl>
                <dl>
                    <dt><a href="#">服务保证</a></dt>
                    <dd><a href="#">退换货原则</a></dd>
                    <dd><a href="#">售后服务保证</a></dd>
                    <dd><a href="#">产品质量保证</a></dd>
                </dl>
                <dl>
                    <dt><a href="#">联系我们</a></dt>
                    <dd><a href="#">网站故障报告</a></dd>
                    <dd><a href="#">购物咨询</a></dd>
                    <dd><a href="#">投诉与建议</a></dd>
                </dl>
                <div class="b_tel_bg">
                    <a href="#" class="b_sh1">新浪微博</a>
                    <a href="#" class="b_sh2">腾讯微博</a>
                    <p>
                        服务热线：<br/>
                        <span>400-123-4567</span>
                    </p>
                </div>
                <div class="b_er">
                    <div class="b_er_c"><img src="images/er.gif" width="118" height="118"/></div>
                    <img src="images/ss.png"/>
                </div>
            </div>
            <div class="btmbg">
                <div class="btm">
                    备案/许可证编号：蜀ICP备12009302号-1-www.dingguagua.com Copyright © 2015-2018 尤洪商城网 All Rights Reserved. 复制必究 ,
                    Technical Support: Dgg Group <br/>
                    <img src="images/b_1.gif" width="98" height="33"/><img src="images/b_2.gif" width="98" height="33"/><img
                        src="images/b_3.gif" width="98" height="33"/><img src="images/b_4.gif" width="98"
                                                                          height="33"/><img
                        src="images/b_5.gif" width="98" height="33"/><img src="images/b_6.gif" width="98" height="33"/>
                </div>
            </div>
            <!--End Footer End -->
        </div>

</body>
<script>

    //加载
    $(function () {

        //默认隐藏
        $("#addProductCategory").css("display", "none");
        $("#leve1").css("display", "none");
        $("#leve2").css("display", "none");


    })

    //点击显示
    function toAddProductCategory() {

        $("#name").val('')
        $("#leve1").css("display", "none");
        $("#leve2").css("display", "none")
        $("#type").attr("disabled", false);
        $("#ids").val('');

        $("input[name='select']").each(function () {

            $(this).prop("checked", false);


        })

        //循环下拉框
        $("#type option").each(function () {

            //获取下拉框的值
            var values = $(this).val()


            if (values == 0) {

                $(this).prop("selected", true);
            }


        })
        //默认隐藏
        $("#addProductCategory").css("display", "");

    }


</script>

<!--[if IE 6]>
<script src="//letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
